﻿using System.Windows;
using System.Windows.Controls;

namespace Moonwish.Main.Silverlight
{
    /// <summary>
    /// 存储空间申请界面,write by zhlin 2012-03-21
    /// </summary>
    public partial class FriendApplySpace : ChildWindow
    {
        private int _applySize;

        public FriendApplySpace(int applySize)
        {
            InitializeComponent();

            _applySize = applySize;

            Loaded += FriendApplySpace_Loaded;
        }

        void FriendApplySpace_Loaded(object sender, RoutedEventArgs e)
        {
            Loaded -= FriendApplySpace_Loaded;

            TxtApplyTip.Text = string.Format(TxtApplyTip.Text, _applySize);
        }

        private void BtnNext_Click(object sender, RoutedEventArgs e)
        {
            if (StrogeSpaceManager.ApplyStrogeSpace(_applySize))
            {
                DialogResult = true;
            }
        }
    }
}

